//Checks if a rectangle is inside another
//boolean rectCheck(r1x1,r1y1,r1x2,r1y2,r2x1,r2y1,r2x2,r2y2);
//Is R1 inside R2?

var returnVal;

r1x1 = argument0;
r1y1 = argument1;
r1x2 = argument2;
r1y2 = argument3;

r2x1 = argument4;
r2y1 = argument5;
r2x2 = argument6;
r2y2 = argument7;

if (r1x1 > r2x1)
{
    if (r1y1 > r2y1)
    {
        if (r1x2 < r2x2)
        {
            if (r1y2 < r2y2)
            {
                returnVal = true;
            } else {returnVal = false;}
        } else {returnVal = false;}
    } else {returnVal = false;}
} else {returnVal = false;}

return returnVal;
